package ca.etsmtl.log430.lab3.donnee.beans;

import java.util.ArrayList;
import java.util.Collection;
/**
 * @author  samuel
 */
public class TeacherBean {
	/**
	 * Teacher's Last Name
	 * @uml.property  name="lastName"
	 */
	private final String lastName;
	
	/**
	 * Teacher's First Name
	 * @uml.property  name="firstName"
	 */
	private  final  String firstName;
	
	/**
	 * Teacher's identification number
	 * @uml.property  name="teacherID"
	 */
	private  final String teacherID;
	
	/**
	 * teacher type (PRF = prof, CHR = charge de cours, e.g. T.A. in French)
	 * @uml.property  name="teacherType"
	 */
	private final  String teacherType;

	/**
	 * List of courses taken by the student
	 * @uml.property  name="coursesTaughtList" multiplicity="(0 -1)"
	 */
	private  final Collection<String> coursesTaughtList;

	/**
	 * List of courses the student is registered for
	 * @uml.property  name="coursesAssignedList" multiplicity="(0 -1)"
	 */
	private  final  Collection<String>  coursesAssignedList;
	
	
/**
 * 
 * @param lastName
 * @param firstName
 * @param teacherID
 * @param teacherType
 * @param coursesTaughtList
 * @param coursesAssignedList
 */
	public TeacherBean(String lastName, String firstName, String teacherID,
			String teacherType, Collection<String> coursesTaughtList,
			Collection<String> coursesAssignedList) {
		super();
		this.lastName = lastName;
		this.firstName = firstName;
		this.teacherID = teacherID;
		this.teacherType = teacherType;
		this.coursesTaughtList = coursesTaughtList;
		this.coursesAssignedList = coursesAssignedList;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((firstName == null) ? 0 : firstName.hashCode());
		result = prime * result
				+ ((lastName == null) ? 0 : lastName.hashCode());
		result = prime * result
				+ ((teacherID == null) ? 0 : teacherID.hashCode());
		result = prime * result
				+ ((teacherType == null) ? 0 : teacherType.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		TeacherBean other = (TeacherBean) obj;
		if (firstName == null) {
			if (other.firstName != null)
				return false;
		} else if (!firstName.equals(other.firstName))
			return false;
		if (lastName == null) {
			if (other.lastName != null)
				return false;
		} else if (!lastName.equals(other.lastName))
			return false;
		if (teacherID == null) {
			if (other.teacherID != null)
				return false;
		} else if (!teacherID.equals(other.teacherID))
			return false;
		if (teacherType == null) {
			if (other.teacherType != null)
				return false;
		} else if (!teacherType.equals(other.teacherType))
			return false;
		return true;
	}

	/**
	 * @return
	 * @uml.property  name="teacherType"
	 */
	public String getTeacherType() {
		return teacherType;
	}



	/**
	 * @return
	 * @uml.property  name="coursesAssignedList"
	 */
	public Collection<String> getCoursesAssignedList() {
		return coursesAssignedList;
	}


	/**
	 * @return
	 * @uml.property  name="lastName"
	 */
	public String getLastName() {
		return lastName;
	}



	/**
	 * @return
	 * @uml.property  name="firstName"
	 */
	public String getFirstName() {
		return firstName;
	}


	/**
	 * @return
	 * @uml.property  name="teacherID"
	 */
	public String getTeacherID() {
		return teacherID;
	}



	public String getType() {
		return teacherType;
	}



	/**
	 * @return
	 * @uml.property  name="coursesTaughtList"
	 */
	public Collection<String> getCoursesTaughtList() {
		return coursesTaughtList;
	}




}
